package com.longcheer.android.calc;

import android.content.Context;
import android.util.AttributeSet;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class CalcButton extends Button implements OnClickListener {
    private CalcActivity calc;

    public CalcButton(Context context, AttributeSet attrs) {
        super(context, attrs);
        calc = (CalcActivity)context;
        setOnClickListener(this);
    }


    @Override
    public void onClick(View v) {
        calc.getDisplay().append(getText());
    }

}
